package Exercise;

public class Exercise4 {
   public static void main(String[] args) {
         Base b=new child();
        child c=(child)b;
        boolean s=c.canCast(b);
       System.out.println(s);
    
    }
   
}
class Base
{
public int sum(int a,int b)
{
    System.out.println("base_int_int");
    return a+b;
}
}
class child extends Base
{
    public long sum(long a,long b)
    {
        System.out.println("child_long_long");
        return a+b;
    }
    public boolean canCast(Base b)
    {
        return b instanceof child;
    }
}
